package com.jiyun.controller;

import common.models.dtos.DaKaDto;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.jiyun.service.IThTourCompletedService;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  巡店任务打卡
 * </p>
 *
 * @author usian
 * @since 2022-10-27
 */
@RestController
@RequestMapping("/tour_completed")
@Api(tags = "接口")
@CrossOrigin
public class ThTourCompletedController{

    @Autowired
    private IThTourCompletedService thTourCompletedService;

    /**
     * 对巡店任务打卡
     * @param daKaDto
     * @return
     */
    @PostMapping("/daka")
    public String UpdateDaKa(DaKaDto daKaDto){
        boolean daka = thTourCompletedService.daka(daKaDto);
        if (daka){
            return "打卡成功";
        }
        return "打卡失败";
    }


}
